// AUSlotsBonusGameTypes.H : Declaration of the CAUSlotsBonusGameTypes class

#ifndef __AUSLOTSBONUSGAMETYPES_H_
#define __AUSLOTSBONUSGAMETYPES_H_

class CAUSlotsMaxBonusGameTypeAccessor
{
public:
	LONG m_gutsid;
	BYTE m_MaxBonusGameType;
	DBSTATUS m_MaxBonusGameTypeStatus;

BEGIN_COLUMN_MAP(CAUSlotsMaxBonusGameTypeAccessor)
	COLUMN_ENTRY_STATUS(1, m_MaxBonusGameType, m_MaxBonusGameTypeStatus)
END_COLUMN_MAP()

BEGIN_PARAM_MAP(CAUSlotsMaxBonusGameTypeAccessor)
	COLUMN_ENTRY(1, m_gutsid)
END_PARAM_MAP()

DEFINE_COMMAND_EX(CAUSlotsMaxBonusGameTypeAccessor, L" \
	SELECT \
		MAX(bonusgametype) AS MaxBonusGameType \
	FROM dbo.AUSlotsBonusGameTypes \
	WHERE gutsid = ?")

	// You may wish to call this function if you are inserting a record and wish to
	// initialize all the fields, if you are not going to explicitly set all of them.
	void ClearRecord()
	{
		memset(this, 0, sizeof(*this));
	}
};

class CAUSlotsMaxBonusGameType : public CCommand<CAccessor<CAUSlotsMaxBonusGameTypeAccessor> >
{
public:
	HRESULT Open( CSession* pSession )
	{
		return CCommand<CAccessor<CAUSlotsMaxBonusGameTypeAccessor> >::Open(*pSession);
	}
};

class CAUSlotsBonusGameTypesAccessor
{
public:
	LONG m_gutsid;
	BYTE m_bonusgametype;
	TCHAR m_description[65];

BEGIN_COLUMN_MAP(CAUSlotsBonusGameTypesAccessor)
	COLUMN_ENTRY(1, m_bonusgametype)
	COLUMN_ENTRY(2, m_description)
END_COLUMN_MAP()

BEGIN_PARAM_MAP(CAUSlotsBonusGameTypesAccessor)
	COLUMN_ENTRY(1, m_gutsid)
END_PARAM_MAP()

DEFINE_COMMAND_EX(CAUSlotsBonusGameTypesAccessor, L" \
	SELECT \
		bonusgametype, \
		description  \
		FROM dbo.AUSlotsBonusGameTypes \
		WHERE gutsid = ?")

	// You may wish to call this function if you are inserting a record and wish to
	// initialize all the fields, if you are not going to explicitly set all of them.
	void ClearRecord()
	{
		memset(this, 0, sizeof(*this));
	}
};

class CAUSlotsBonusGameTypes : public CCommand<CAccessor<CAUSlotsBonusGameTypesAccessor> >
{
public:
	HRESULT Open( CSession* pSession )
	{
		return CCommand<CAccessor<CAUSlotsBonusGameTypesAccessor> >::Open(*pSession);
	}
};

#endif // __AUSLOTSBONUSGAMETYPES_H_
